<script lang="ts" setup>
import { computed } from "vue";
import { useStore } from "vuex";
const store = useStore();
// 同步主应用的 缓存路由列表信息
const cacheList = computed(() => {
  return store.state.cachePageList;
});
</script>
<template>
  <div id="app">
    <div>
      <router-link to="/appHome">HOME</router-link>
      <router-link to="/appAbout">ABOUT</router-link>
    </div>
    <router-view v-slot="{ Component }">
      <keep-alive :include="cacheList">
        <component :is="Component" />
      </keep-alive>
    </router-view>
  </div>
</template>

<style lang="stylus" scoped>
#app
  font-family Avenir, Helvetica, Arial, sans-serif
  -webkit-font-smoothing antialiased
  -moz-osx-font-smoothing grayscale
  text-align center
  color #2c3e50
</style>
